load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "workloadccl",
    srcs = [
        "fixture.go",
        "storage.go",
    ],
    importpath = "github.com/cockroachdb/cockroach/pkg/ccl/workloadccl",
    visibility = ["//visibility:public"],
    deps = [
        "//pkg/base",
        "//pkg/cloud",
        "//pkg/cloud/amazon",
        "//pkg/cloud/azure",
        "//pkg/cloud/gcp",
        "//pkg/security/username",
        "//pkg/settings/cluster",
        "//pkg/util/ctxgroup",
        "//pkg/util/errorutil",
        "//pkg/util/humanizeutil",
        "//pkg/util/limit",
        "//pkg/util/log",
        "//pkg/util/timeutil",
        "//pkg/workload",
        "@com_github_cockroachdb_cockroach_go_v2//crdb",
        "@com_github_cockroachdb_errors//:errors",
        "@com_github_spf13_pflag//:pflag",
    ],
)

go_test(
    name = "workloadccl_test",
    size = "small",
    srcs = [
        "bench_test.go",
        "fixture_test.go",
        "main_test.go",
    ],
    exec_properties = select({
        "//build/toolchains:is_heavy": {"test.Pool": "large"},
        "//conditions:default": {"test.Pool": "default"},
    }),
    deps = [
        ":workloadccl",
        "//pkg/base",
        "//pkg/ccl",
        "//pkg/security/securityassets",
        "//pkg/security/securitytest",
        "//pkg/server",
        "//pkg/settings/cluster",
        "//pkg/sql/stats",
        "//pkg/testutils",
        "//pkg/testutils/serverutils",
        "//pkg/testutils/skip",
        "//pkg/testutils/sqlutils",
        "//pkg/testutils/testcluster",
        "//pkg/util/envutil",
        "//pkg/util/leaktest",
        "//pkg/util/log",
        "//pkg/util/randutil",
        "//pkg/util/timeutil",
        "//pkg/workload",
        "//pkg/workload/tpcc",
        "@com_github_spf13_pflag//:pflag",
        "@com_github_stretchr_testify//require",
    ],
)
